package com.yunxi.service.localService.impl.sto;

import com.yunxi.core.service.ServiceImplPlus;
import com.yunxi.core.util.BeanTools;
import com.yunxi.dao.sto.StoStorageCompanyMapper;
import com.yunxi.model.sto.StoStorageCompany;
import com.yunxi.service.localService.sto.StoStorageCompanyService;
import com.yunxi.sto.pojo.StoStorageCompanyListVO;
import com.yunxi.sto.pojo.StoStorageCompanyVO;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 仓储公司 服务实现类
 * </p>
 *
 * @author caoYong
 * @since 2019-06-06
 */
@Service
public class StoStorageCompanyServiceImpl extends ServiceImplPlus<StoStorageCompanyMapper, StoStorageCompany> implements StoStorageCompanyService {

    /**
     * 仓储公司列表
     * @return
     * @throws Exception
     */
    @Override
    public List<StoStorageCompanyListVO> companyList(String isOnUse) throws Exception {
        StoStorageCompanyListVO vo = new StoStorageCompanyListVO();
        vo.setIsOnUse(isOnUse);
        List<StoStorageCompanyListVO> list = baseMapper.companyList(vo);
        return list;
    }

    /**
     * 导出
     * @param stoStorageCompanyVO
     * @return
     */
    @Override
    public List<StoStorageCompanyVO> export(StoStorageCompanyVO stoStorageCompanyVO) {
        Map map = BeanTools.bean2map(stoStorageCompanyVO);
        List<StoStorageCompanyVO> list = baseMapper.queryByList(map);
        return list;
    }
}
